package cn.yll.api.user.service;

import cn.yll.common.module.RestModel;
import cn.yll.api.user.request.UserExtendModifyRequest;
import cn.yll.api.user.response.UserExtendResponse;
import org.springframework.cloud.openfeign.FeignClient;
import org.springframework.web.bind.annotation.*;

/**
 * 用户扩展信息表 相关接口
 * @author yangll
 */
@FeignClient(value = "shop-user", contextId = "userExtendFeinService", path = "/userExtend")
public interface RemoteUserExtendFeignService {

    /**
     * 更新用户扩展信息接口
     */
    @PostMapping("/modify/userId")
    RestModel<Boolean> modifyByUserId(@RequestBody UserExtendModifyRequest modifyRequest);

    /**
     *
     */
    @GetMapping("/getById/{id}")
    RestModel<UserExtendResponse> getUserExtendById(@PathVariable("id") Long id);

    /**
     * 根据用户ID查询扩展信息
     */
    @GetMapping("/getByUserId/{userId}")
    RestModel<UserExtendResponse> getUserExtendByUserId(@PathVariable("userId") Long userId);

    /**
     * 根据身份证号查询扩展信息
     */
    @GetMapping("/getByIdNo/{idNo}")
    RestModel<UserExtendResponse> getByIdNo(@PathVariable("idNo") String idNo);

    /**
     * 根据邮箱账号查询扩展信息
     */
    @PostMapping("/getByEmail")
    RestModel<UserExtendResponse> getByEmail(@RequestBody String email);
}
